﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Solution.Business.Entities;

namespace Solution.Data
{
   public class NewsDAC
    {
        SolutionEntities context = SolutionEntities.Context;
        public List<News> News_GetByTop(string Top, string Where, string Ord)
        {
            var list = context.News_GetByTop(Top, Where, Ord);
            return list.ToList();
        }


        public void News_Insert(News news)
        {
            context.News_Insert(news.Title, news.Date, news.Content, news.Price, news.Acreage, news.Address, news.Status, news.Images, news.TrId, news.LId, news.PmId, news.PrId, news.UnId, news.DId, news.LgId, news.Order, news.Active, news.Position, news.Image1, news.Image2, news.Image3, news.Image4, news.Image5, news.Image6, news.Image7, news.Image8, news.Image9, news.Video, news.Map);
        }

        public void News_Update(News news)
        {
            context.News_Update(news.NewsId, news.Title, news.Date, news.Content, news.Price, news.Acreage, news.Address, news.Status, news.Images, news.TrId, news.LId, news.PmId, news.PrId, news.UnId, news.DId, news.LgId, news.Order, news.Active, news.Position, news.Image1, news.Image2, news.Image3, news.Image4, news.Image5, news.Image6, news.Image7, news.Image8, news.Image9, news.Video, news.Map);
        }
    }
}
